<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->

<head>
<meta charset="utf-8">
<title>SMM撮合系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css">

<link href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css" id="style_components" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/css/plugins.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/layout.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color">
<link href="${request.getContextPath()}/Public/assets/admin/css/custom.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css">

<link href="${request.getContextPath()}/Public/assets/admin/css/common.css" rel="stylesheet" type="text/css">

<link rel="shortcut icon" href="${request.getContextPath()}/Public/favicon.ico">
<link href="${request.getContextPath()}/Public/css/client.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/css/customerDetail.css" rel="stylesheet" type="text/css">
<script>
	BASE_URL = '${request.getContextPath()}'
</script>
</head>

<body class="page-header-top-fixed">
<!--头部信息结束 -->
<div class="page-header">
	<!--头部开始-->
	<#include "/include/top.html" />
	<!-- 头部信息结束 -->


	<!-- 头部菜单开始 -->
	<#include "/include/top_menu.html" />
	<!-- 头部菜单结束 -->
</div>
<!-- END HEADER -->

		<!-- BEGIN PAGE CONTAINER -->
<div class="page-container">
	<!-- 内容开始 -->
	<div class="page-content">
		<div class="container-fluid">
			<!-- 当前位置提示开始 -->
			<ul class="page-breadcrumb breadcrumb">
				<li>
					<a href="#">首页</a><i class="fa fa-circle"></i>
				</li>
				<li class="active">
					 商品管理
				</li>
				
			</ul>
			<!-- 当前位置提示结束 -->
			<div class="row margin-top-10">
				<!--位置提示结束  -->
				<div class="col-md-12">
				     <div class="portlet light bordered">
					    <div class="portlet-body">
						 <form id="frm1" method="post">
					    	<div class="row">
							  <div style="float: left;width: 80%">
							   <div style="float:left; width:100px; margin-left:15px;">
								<div class="btn-group pull-left">			
									<a class="btn green" href="javascript:CommonUtils.doExecute('${request.getContextPath()}/itemattr/batchDisable.do');">批量禁用 </a>
								</div>
							   </div>
							   <div style="width:140px;float:left;">
								<select class="form-control" name="attribute">
								  <option value="a.name"  <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.name">selected="selected" </#if> >属性名</option>
								  <option value="a.fillmode"  <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.fillmode">selected="selected" </#if> >填写方式</option>
								  <option value="a.dataregural" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.dataregural">selected="selected" </#if> >数据规范</option>
								  <option value="a.default_value" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.default_value">selected="selected" </#if> >默认值</option>
								  <option value="a.options" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.options">selected="selected" </#if> >可选项</option>
								  <option value="a.required" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.required">selected="selected" </#if> >是否必填</option>
								  <option value="a.mainproperty" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.mainproperty">selected="selected" </#if> >是否只要属性</option>
								  <option value="a.createdby" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.createdby">selected="selected" </#if> >添加人</option>
								  <option value="a.status" <#if parameters??&&parameters.attribute??&&parameters.attribute=="a.status">selected="selected" </#if> >状态</option>
								</select>
							</div>
							<div  style="width:110px;float:left; margin-left:15px;">
								<select class="form-control" name="operator">
									  <option value="1" <#if parameters??&&parameters.operator??&&parameters.operator=="1">selected="selected" </#if>>包含</option>
							          <option value="2" <#if parameters??&&parameters.operator??&&parameters.operator=="2">selected="selected" </#if>>不包含</option>
							          <option value="3" <#if parameters??&&parameters.operator??&&parameters.operator=="3">selected="selected" </#if>>等于</option>
							          <option value="4" <#if parameters??&&parameters.operator??&&parameters.operator=="4">selected="selected" </#if>>不等于</option>
							          <option value="5" <#if parameters??&&parameters.operator??&&parameters.operator=="5">selected="selected" </#if>>开始字符</option>
							          <option value="6" <#if parameters??&&parameters.operator??&&parameters.operator=="6">selected="selected" </#if>>结束字符</option>
							          <option value="7" <#if parameters??&&parameters.operator??&&parameters.operator=="7">selected="selected" </#if>>为空</option>
							          <option value="8" <#if parameters??&&parameters.operator??&&parameters.operator=="8">selected="selected" </#if>>不为空</option>
								</select>
							</div>
							<div class="col-md-3">
								<input type="text" class="form-control" name="content" value="<#if parameters??&&parameters.content??>${parameters.content}</#if>">
							</div>
							<div class="col-md-2">
									<button  class="btn green">
										<i class="fa fa-search"></i> 搜索 
									</button>
								</div>
							</div>
							
							
							<div style="float: right;width: 13%;text-align: right; padding-right: 18px; float: right;">
													<a  class="btn green" href="${request.getContextPath()}/itemattr/jumpAddPage.do">
														<i class="fa fa-plus"></i> 添加属性
													</a>
								</div>
						</div>
					</form>
						
						<div class="table-scrollable">
				          		<table class="table table-striped table-bordered table-advance table-hover ttTbl" id="myTable">
						          	<thead>
										<tr>
											<th class="table-checkbox">
												<input type="checkbox" class="group-checkable" data-set="#myTable .checkboxes"/>
											</th>		
											<th>属性名</th>
											<th>填写方式</th>
											<th>数据规范</th>
											<th>默认值</th>
											<th>可选项</th>
											<th>是否必填</th>
											<th>是否是主要属性</th>
											<th>添加人</th>
											<th>状态</th>
											<th>操作</th>
										</tr>
								</thead>
								<tbody  >
										<#list itemAttrList as list>
									       <tr class="odd gradeX">
												<td><input name="checkboxes" class="checkboxes" type="checkbox"  value="${list.id?if_exists}"></td>
												<td>${list.name?if_exists}</td>
												<td>
													<#if list.fillmode??>
														${list.fillmode}
													</#if>
												</td>
												<td>
													${list.dataregural?if_exists}		
												</td>
												<td>${list.default_value?if_exists}</td>
												<td>${list.options?if_exists}</td>
												
												<td>${list.required?if_exists}</td>
												<td>${list.mainproperty?if_exists}</td>
												<td>${list.createdby?if_exists}</td> 
												<td>
													${list.status?if_exists}
												</td> 

												<td style="text-align: center;">
													<#if list.status!="禁用">
														<a class="btn btn-xs green"  onclick="disable('${list.id}')">禁用</a> 
													</#if>
													<#if list.listorder??>
														<a class="btn btn-xs green"  href="${request.getContextPath()}/itemattr/updateSorting.do?id=${list.id}&&sorting=${list.listorder?if_exists}&&sortingType=1">上移动</a>            
														<a class="btn btn-xs green"  href="${request.getContextPath()}/itemattr/updateSorting.do?id=${list.id}&&sorting=${list.listorder?if_exists}&&sortingType=2">下移动</a>
													</#if>
												 </td>
											</tr>
									</#list>
								  </tbody>
								</table>
					    </div>
					</div>
				</div>
		</div>
</div>

</div>
</div>
</div>
		
<!-- END PAGE CONTAINER -->
<!-- 底部开始 -->
<#include "/include/foot.html" />
<!-- 底部结束 -->

<!--[if lt IE 9]>
<script src="${request.getContextPath()}/Public/assets/global/plugins/respond.min.js"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/excanvas.min.js"></script> 
<![endif]-->
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/kkpager.min.js" type="text/javascript"></script>
<script src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js" type="text/javascript"></script>
<script>
	
	jQuery(document).ready(function() {
	   Metronic.init(); // init metronic core componets
	   Layout.init(); // init layout
	   CommonUtils.checkInit();
	});


	//批量禁用
	function  disable(id){
		$.ajax({
			url : "${request.getContextPath()}/itemattr/batchDisable.do",
			type : "post",
			async: false,
			data : {ids:id},
			success : function(result) {
				CommonUtils.succModal2("系统提示",result.msg,window.location);
			   }
			}); 
	}


</script>
</body>
</html>